package com.atwork.constant;

/**
 * @Describe : 响应码枚举类
 * @Mail :yinjiaxing_web@163.com
 * @Author :JeffOsmond
 * @Date :2018/02/01
 */
public enum ResponseCode {

    SUCCESS(0,"SUCCESS"),                        //请求成功
    ERROR(1,"ERROR"),                            //服务器拒绝请求
    NEED_LOGIN(10,"NEED_LOGIN"),                 //未授权
    NO_AUTH(11,"NO_AUTH"),                       //无相关权限
    ILLEGAL_ARGUMENT(2,"ILLEGAL_ARGUMENT");      //参数错误

    private final int code;
    private final String desc;


    ResponseCode(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode(){
        return code;
    }
    public String getDesc(){
        return desc;
    }

}

